using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class web_Controls_page_center_timkiemtuyendung : System.Web.UI.UserControl
{
    Common _common = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        _common = new Common();
        LoadGroupByChucdanh();
        LoadGroupByNganhnghe();
    }
    
    void LoadGroupByChucdanh()
    {
        rpt_group_by_chucdanh.DataSource = _common.ExeceuteDataset("select A.ma_chuc_danh, A.ten_chuc_danh, B.total from danhmuc_chuc_danh as A right outer join (select ma_chuc_danh, count(ma_chuc_danh) as total from ViecLamTrong_ho_so_tuyen_dung where kich_hoat = 1 group by ma_chuc_danh) as B on A.ma_chuc_danh = B.ma_chuc_danh");
        rpt_group_by_chucdanh.DataBind();
    }
    void LoadGroupByNganhnghe()
    {
        rpt_group_by_nganh.DataSource = _common.ExeceuteDataset("select A.ma_chuyen_mon, A.ten_chuyen_mon, B.total from DanhMuc_chuyen_mon as A right outer join (select count(A.ma_chuyen_mon) as total, A.ma_chuyen_mon from ViecLamTrong_yeu_cau_chuyen_mon as A where A.kich_hoat = 1 group by A.ma_chuyen_mon) as B on A.ma_chuyen_mon = B.ma_chuyen_mon");
        rpt_group_by_nganh.DataBind();
    }
}
